package state;

/**
 * @ClassName StateDemo
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/7/23 14:18
 * @Version 1.0
 */
public class StateDemo {
	public static void main(String[] args) {
		//首先定义一个人
		final Human human = new Human();

		human.setState(new Child());
		human.doWork();

		human.setState(new Audit());
		human.doWork();

		human.setState(new Old());
		human.doWork();
	}
}
